<script src="../media/system/js/mootools-core.js" type="text/javascript"></script>
<script src="../media/system/js/core.js" type="text/javascript"></script>
<form action="index.php?top=page&option=com_frquestion" method="post" name="adminForm" id="adminForm">
<!-- LEFT -->
 <?php echo $this->loadTemplate('search','default') ?>
 <!-- END LEFT -->
 
 <!-- CONTENT -->
 <div id="jm-content">
    <h3 class="jm-title">
         <?php
            if($this->sr=='1')
            {
                echo '検索結果';
            }
            else echo 'アンケート';
            ?>    
    </h3>
        <div style="clear: both;"></div>
        <div class="cc">
            <table cellspacing="0" cellpadding="0" width="100%" border="0" id="show">
                <tfoot>
        			<tr>
        				<td colspan="15" style="text-align: center;">
        				    <?php echo $this->pagination->getListFooter(); ?>	
                        </td>
        			</tr>
        		</tfoot>
                <tbody>
                    <tr>
                        <th style="text-align: center;width: 10%;">コード</th>
                        <th width="50%" >アンケート名</th>
                        <th width="20%" >開始日</th>
                        <th width="20%" >完了日</th>
                    </tr>
                    
                    <?php
                        if($this->rows != null){
                            foreach($this->rows as $value){
                                /*foreach ($this->check as $v) {
                                    if ($value->SERQ_CODE == $v->SESS_SERQ_CODE) {
                                        
                                    }
                                }*/
                    ?>
                    <tr>
                        <td style="text-align: center;"><?php echo $value->SERQ_CODE; ?></td>
                        <td><a href="index.php?top=page&option=com_frquestion&task=detail&id=<?php echo $value->SERQ_CODE; ?>"><?php echo $value->SERQ_TITLE; ?></a></td>
                        <td><?php if($value->SERQ_START != 0){ $dt = date('Y-m-d',strtotime($value->SERQ_START));}else{ $dt=null;} echo $dt; ?></td>
                        <td><?php if($value->SERQ_FINISH != 0){ $dt = date('Y-m-d',strtotime($value->SERQ_FINISH));}else{ $dt=null;} echo $dt;  ?></td>
                    </tr>
                    <tr>
                        <td colspan="5"><hr /></td>                        
                    </tr>
                    
                    <?php
                            }
                        }else{
                            echo '<tr><td colspan="4"><br/></td></tr>
                                  <tr><td colspan="4" align="center">データは見つかりませんでした</td></tr>';
                        }
                    ?>
                </tbody>
            </table>
        </div>
        <div>
		<input type="hidden" name="task" value="" />
        </div>
  
        
    
 </div>
 <!-- END RIGHT -->
 
 </form>
